package homework3;

import java.util.ArrayList;

public class Goods {
    private String ID;
    private String name;
    private double price;
    private String danwei;
    public static ArrayList<Goods> list = new ArrayList<>();
    public static ArrayList<Goods> goodslist = new ArrayList<>();

    public static ArrayList<Goods> getList() {
        return list;
    }

    public static void setList(ArrayList<Goods> list) {
        Goods.list = list;
    }

    public Goods() {
    }

    public Goods(String ID, String name, double price, String danwei) {
        this.ID = ID;
        this.name = name;
        this.price = price;
        this.danwei = danwei;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDanwei() {
        return danwei;
    }

    public void setDanwei(String danwei) {
        this.danwei = danwei;
    }
    public void show() {
        System.out.println(this.ID+"  "+this.name+"  "+this.price+"  "+this.danwei);
    }
}
